var status = -1;

function action(c, b, a) {
    status++;
    if (cm.isQuestActive(30003)) {
        action30003(c, b, a)
    } else {
        actionDefault(c, b, a)
    }
}

function action30003(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, true, true);
            cm.inGameDirectionEvent_MoveAction(0);
            cm.setStandAloneMode(true);
            cm.inGameDirectionEvent_AskAnswerTime(2000);
            cm.curNodeEventEnd(true)
        } else {
            if (status === a++) {
                cm.sendNormalTalk("出口没有任何问题啊？重新回去吧。", 3, 0, false, true)
            } else {
                if (status === a++) {
                    cm.inGameDirectionEvent_AskAnswerTime(500)
                } else {
                    if (status === a++) {
                        cm.updateInfoQuest(30003, "portaluse=2");
                        cm.setInGameDirectionMode(false, true, false);
                        cm.setStandAloneMode(false);
                        cm.dispose();
                        cm.warp(910700200, 0)
                    } else {
                        cm.dispose()
                    }
                }
            }
        }
    }
}

function actionDefault(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_MoveAction(0);
            cm.setStandAloneMode(true);
            cm.inGameDirectionEvent_PushMoveInfo(0, 200, 1300, -232);
            cm.curNodeEventEnd(true)
        } else {
            if (status === a++) {
                cm.inGameDirectionEvent_AskAnswerTime(4028)
            } else {
                if (status === a++) {
                    cm.sendNormalTalk("四周的雾很浓，看不清东西。不知道会有什么东西出现，必须小心一点。", 3, 0, false, true)
                } else {
                    if (status === a++) {
                        cm.inGameDirectionEvent_PushMoveInfo(1, 0, 0, 0)
                    } else {
                        if (status === a++) {
                            cm.inGameDirectionEvent_AskAnswerTime(0)
                        } else {
                            if (status === a++) {
                                cm.setStandAloneMode(false);
                                cm.setInGameDirectionMode(false, true, false);
                                cm.dispose()
                            } else {
                                cm.dispose()
                            }
                        }
                    }
                }
            }
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};